// TOWN DIALOGUE SCRIPT
//    Town 154: Malloc

begintalkscript;

variables;

short i,j,k,r1,choice;

// Foxfire
// Foxfire DLG IN AUXDLG 10100


// Mia

begintalknode;
	tag = 60;
	state = -1;
	nextstate = 29;
	question = "Mia";
	text1 = "You meet a middle-aged woman, deep into her fourth tankard of ale. She looks blearily up at you. _I'm Mia._";
	text5 = "Mia is deep into yet another tankard of ale. She can't focus her eyes.";
	action = INTRO;

begintalknode;
	state = 29;
	nextstate = 30;
	question = "_How are you?_";
	text1 = "_I'm drowning my sorrows. Why shouldn't I?_";

begintalknode;
	state = 30;
	nextstate = 31;
	question = "_What sorrow are you seeking to bury?_";
	text1 = "_My poor child._";

begintalknode;
	state = 31;
	nextstate = 32;
	question = "_What happened to your child?_";
	text1 = "_My poor son, lost fishing on Lake Tomor. His boat went out and hasn't returned. Oh, for something to remember him by._";
	text3 = "_My poor son, lost fishing on Lake Tomor. His boat went out, and he never came back to me. At least I have the ring you brought me._ She takes another long pull of ale.";
	action = DEP_ON_SDF 154 9 1;

begintalknode;
	state = 32;
	nextstate = -1;
	condition = gf(154,9) <= 1;
	question = "_Lake Tomor?_";
	text1 = "She gives you a funny look. _The huge lake. To the north. How can you miss it? It's so large. My boy went out, and he never returned._";

begintalknode;
	state = 32;
	nextstate = -1;
	condition = gf(154,9) <= 1;
	question = "_Is there anything he had that you'd like to have as a remembrance?_";
	text1 = "_I gave him a silver ring, a family heirloom. Oh, what I would give to have it back again! But I am sure it is lost below the lake forever._";
	code =
		sf(154,9,1);
		toggle_quest(73,1);
	break;

begintalknode;
	state = 29;
	nextstate = -1;
	condition = has_spec_item(45) > 0 && gf(154,9) == 1;
	question = "_I found a silver ring in a shipwreck on Lake Tomor. Did it belong to your son?_";
	action = END_TALK;
	code =
		run_hardcode(158);
	break;

begintalknode;
	state = 29;
	nextstate = -1;
	condition = gf(154,9) > 1;
	question = "_So. Um. How are things?_";
	action = END_TALK;
	code =
		run_hardcode(158);
	break;

begintalknode;
	state = 29;
	nextstate = -1;
	condition = gf(154,9) >= 1;
	question = "_Tell me about your son._";
	text1 = "_His name was Colin. He was a lovely lad, and a good sailor. Then he went on the lake, and the storm hit. He never came back to me. That was six months ago._";

// Mrrrr

begintalknode;
	tag = 80;
	state = -1;
	nextstate = 57;
	question = "Mrrrr";
	text1 = "You meet the trainer of Malloc. He's an educated nephilim, a rarity in the cities of the Empire (or anywhere). He sits patient and alert, ready to help you increase your skills. _I am Mrrrr. This is a place of learning._";
	text5 = "Mrrrr sits and watches you carefully. A nephil in an Empire village has to be alert. In any continent besides Valorim, he would probably be killed on sight.";
	action = INTRO;

begintalknode;
	state = 57;
	nextstate = 58;
	question = "_What is your job here?_";
	text1 = "He purrs. _I am the trainer of Malloc. And a hunter. I don't have many other interests, really._";

begintalknode;
	state = 57;
	nextstate = -1;
	question = "_Can you train me?_";
	text1 = "You conclude your training.";	
	code = 
		if (species_in_party(2))
		begin_shop_mode("Mrrrr",
		  "Mrrrr is a master of archery. You get the nephilim-discount.",
		  98,0,0);	
		else begin_shop_mode("Mrrrr",
		  "Mrrrr is a master of archery.",
		  98,5,0);	
	break;

begintalknode;
	state = 58;
	nextstate = -1;
	question = "_Why don't you have other interests?_";
	text1 = "His whiskers twitch. _I have so many other skills to master. Don't really have much time for hobbies._";
begintalknode;
	state = 58;
	nextstate = 59;
	question = "_What do you hunt?_";
	text1 = "_Things. Foes. Pests. Unicorns and so on. For bounty. They pay me. I go out and hunt. When I have no work, they let me keep the books clean._";
	text2 = "_But I have worked little lately. Giants are dangerous, and guards are hostile. I stay here. Mrrrrr._";

begintalknode;
	state = 59;
	nextstate = -1;
	question = "_Are you the original librarian?_";
	text1 = "_Hmrrr. No. Librarian was crushed by a rock. Very sad. He hated my kind. Still didn't want to see him dead._";


begintalknode;
	state = 57;
	nextstate = -1;
	question = "_Is it safe for you to be in town here?_";
	text1 = "_Hrrrmmmm. Safer for me than for you. I am their tolerated pet nephil. You have not been given that privilege yet._";
	text3 = "_Hrrrmmmm. It is safe. Or has been safe. I am useful. I am their tolerated pet nephil._";
	code =
		if (species_in_party(2))
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 57;
	nextstate = -1;
	condition = 1;
	question = "_I don't need any training._";
	text1 = "_Then I wish you safety. Mrrr._";
	action = END_TALK;
